<%@ include file="/common/taglibs.jsp"%>
<title><fmt:message key="approve5.title"/></title>
<%
response.setHeader("Cache-Control","no-cache"); // HTTP 1.1
response.setHeader("Pragma","no-cache"); // HTTP 1.0
response.setDateHeader ("Expires", -1); // Prevents caching at the proxy server
%>
<spring:bind path="associatorView.*">
    <c:if test="${not empty status.errorMessages}">
    <div class="error">
        <c:forEach var="error" items="${status.errorMessages}">
            <img src="<c:url value="/images/iconWarning.gif"/>"
                alt="<fmt:message key="icon.warning"/>" class="icon"/>
            <c:out value="${error}" escapeXml="false"/><br />
        </c:forEach>
    </div>
    </c:if>
</spring:bind>
<script language="JavaScript1.2">
function popExemptBusiness(theURL,winName,features){
	self.name = "Exempt Business List"; 
  	window.open(theURL,winName,features);
	return false;
}
</script>
<c:set var="buttons">
    <input type="submit" class="button" name="_target5" value="<fmt:message key="button.done"/>"/>
    <input type="submit" class="button" name="_target3" value="<fmt:message key="button.back"/>"/>
    <input type="submit" class="button" name="_cancel" value="<fmt:message key="button.cancel"/>"/>
</c:set>
<label><fmt:message key="approve5.text"/></label><br>
<fieldset>
<legend><fmt:message key="approve5.business.details"/></legend>
<table border="0">
    <%@ include file="associatedBusinessTable.inc"%>
</table>    
</fieldset>
<hr class="hrGray"/>

<form:form name="actionItems" commandName="associatorView" method="post" action="/wems/associateComplaint2.wems?tab=pendingComplaints" onsubmit="return validateBusiness(this)">
<form:hidden path="businessId" />
<input type="hidden" name="page" value="4" />
<table border="0">
<tr> 
	<td align="right"> 
	    <label for="natureOfComplaintId"><fmt:message key="approve5.nature"/>&#42;</label>
	</td>
	<td align="left" colspan="3">
	    <form:select id="natureOfComplaintId" multiple="false" path="natureOfComplaintId">
	    <form:options items="${sessionScope.natureOfComplaintList}" itemLabel="value" itemValue="id"/>
	    </form:select>
	</td>
</tr>
<tr>  
	<td align="right" width="30%"> 
	    <form:errors path="actionable" cssClass="fieldError"/>
	    <label for="actionable"><fmt:message key="actionable.checkbox"/>&#42;</label>
	</td>
	<td align="left" width="10%">
	  	<form:checkbox path="actionable" id="actionable" value="0"/>&nbsp;Yes
	</td>
    <td align="right" width="20%"> 
        <label for="nonActionableId"><fmt:message key="actionable.reason"/>&#58;</label>
    </td>
    <td align="left" width="40%">
        <form:select id="nonActionableId" multiple="false" path="nonActionableId">
        <form:options items="${sessionScope.nonActionableList}" itemLabel="value" itemValue="id"/>
        </form:select>
    </td> 
</tr>
<tr><td colspan="2" align="right">
<a href="." onclick="return popExemptBusiness('exemptBusinessView.wems','','width=500,height=350,scrollbars=1')"><fmt:message key="approve4.exempt.url"/></a>
</td>
<td colspan="2">&nbsp;</td></tr>
<tr><td colspan="4"><hr class="hrGray"/></td></tr>
<tr><td colspan="4">
<display:table name="complaintList" class="capacitytable" requestURI="" id="complaintList" export="false">
	<display:caption style="hrGray"><fmt:message key="approve5.associated.complaints"/></display:caption>
	<display:column property="complaintId" titleKey="complaint.id" sortable="false"/>   
    <display:column property="complaintDate" titleKey="complaint.date" format="{0,date,MM/dd/yyyy}" sortable="false"/>
    <display:column property="complaintStatus" titleKey="complaint.status" sortable="false" escapeXml="false"/>
    <display:column property="IRLSentDate" titleKey="irl.sent.date" format="{0,date,MM/dd/yyyy}" sortable="false"/>
</display:table>
</td></tr>
<tr> 	    
<td class="buttonBar" colspan="4" align="center">
    <c:out value="${buttons}" escapeXml="false"/>
</td>
</tr>
</table>
</form:form>
